/**
 * Copyright (c) 2011 Alessandro Camillo'.
 *
 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 *
 */

generic configuration VWSGSensorC(uint8_t accepted_type) {

	provides {
//		interface SplitControl;
		interface Read<uint16_t> as	Frequency;
//		interface VWSGSensorDebug;
	}
}

implementation {
  
	components new VWSGSensorP( accepted_type );

//	SplitControl				= VWSGSensorP;
	Frequency						= VWSGSensorP;
//	VWSGSensorDebug			= VWSGSensorP;
	
//	VWSGSensorP.GIO					-> HplMsp430GeneralIOC.Port23;
	components LedsC as Leds;
	VWSGSensorP.Leds-> Leds;

	components new TimerMilliC();
	components new TimerMilliC() as Timeout;
	VWSGSensorP.StartupTimer -> TimerMilliC;
	VWSGSensorP.Timeout			-> Timeout;

	components new Msp430Uart0C() as UartC;
	UartC.Msp430UartConfigure		-> VWSGSensorP;
	VWSGSensorP.Resource			-> UartC.Resource;
	VWSGSensorP.SensorStream		-> UartC;

 
	components HplMsp430GeneralIOC;
  components new Msp430GpioC();

 	Msp430GpioC.HplGeneralIO  -> HplMsp430GeneralIOC.ADC2;
  VWSGSensorP.GIO   -> Msp430GpioC;
 

//	components new TimerMilliC() as LoopC;
//	VWSGSensorP.Loop				-> LoopC;
  
}
